home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 26.zip
/
BS1 part 26
/
The Director Toolkit v1.0.adf
/
Executes
/
AssignIt
/
docs
< prev
Wrap
Text File
|
1987-02-25
|
5KB
|
115 lines
|c7|t1|f2AssignIt|c3|t0|f1|r1
This program is particularly useful to |c7Director|c3 owners who are
using custom fonts or using the sound module, but may also be useful
with any other programs having similar problems determining
the name of the directory they are being run from when run from
an icon.|r1
Similar to |c7IconX|c3|-, |c7AssignIt|c3 allows you to add several
|c7CLI|c3 commands to be
automatically run from an icon. It's primary purpose is to make it
easier to do some preliminary |c7ASSIGN|c3 commands before running the
|c7Projector|c3|-, and some cleanup |c7ASSIGN|c3|-s afterwards. It
also can be used from the |c7CLI|c3 as well.|r1
|e
When using custom fonts or the sound module, someone has to tell the
system where all the stuff is.|r1
Due to an anomaly in the |c7AmigaDOS Execute()|c3 system
routine (which the Director makes use of
internally for its EXECUTE command), commands being |c7EXECUTE|c3|-d
will always think they are being run from the root directory of
|c7DF0:|c3|-, with no way to determine where the
|c7EXECUTE|c3|-ing film is actually
being run from. This makes it virtually impossible to assign |c7FONTS:|c3
to the directory you are running your .film from without making some
assumptions as to the name of the disk on which the film is
contained. This presents some difficulties in producing a film
that can just be dragged to a hard disk and run without adding extra
|c7ASSIGN|c3|-s to the hard disk's startup-sequence.|r1
|e
This program is a small (6K) program with icon, that determines it's
own directory, and does an |c7ASSIGN HERE:|c3 to that directory. It
will then search the |c7tooltypes|c3 parameters in the icon for a string
that starts with |c7EXECUTE=|c3. It will do an |c7Execute()|c3 call to
run the program(s) (with parameters) specified by these |c7EXECUTE=|c3
entries (multiple entries are allowed).|r1
You can inspect the |c7tooltypes|c3 parameters by clicking on the icon once,
and then selecting |c7"info"|c3 from the |c7WorkBench|c3 menus.|r1
|e
The example does an |c7EXECUTE=ToolKit:projector here:demo.film|c3 to
run a simple
circle drawing film file. This particular demo simply loads a blank
background file from the current directory using |c7HERE:|c3 to reference
it. While |c7HERE:|c3 is not required to access picture files in the current
directory, it is simply showing that |c7HERE:|c3 has been assigned and is
working.|r1
The reference to the |c7ToolKit|c3 is only necessary because there was no
room on the |c7ToolKit|c3 disk to place an extra copy of the
|c7Projector|c3 into
the |c7AssignIt|c3 directory,
and your boot disk
may not have the |c7Projector|c3 included in the |c7CLI|c3 search path.
If you drag the |c7AssignIt|c3 directory to a hard disk, you can eliminate
the |c7ToolKit:|c3 reference in the |c7tooltypes|c3 here if the
|c7Projector|c3 is in
your |c7C:|c3 directory or somewhere in the |c7CLI|c3 search path. Otherwise
you can copy the |c7Projector|c3 into the |c7AssignIt|c3 directory,
which also will eliminate the need for this
reference to |c7ToolKit|c3|-.
|e
A film can then assume that |c7HERE:|c3 is assigned
to it's current directory, and specify that as the location of the
|c7FONTS:|c3 and the |c7MOD:|c3(for the sound module) if required, with
|c7Director|c3 commands such as:|r1
|+8|c7EXECUTE a,"assign mod: here:options"|c3|r1
|+8|c7EXECUTE a,"assign fonts: here:fonts"|c3|r1
All other references to file names (picture,sound etc.) within the
script should probably be done using |c7HERE:|c3 for correct operation.|r1
Upon exit of the program, |c7AssignIt|c3 will un-assign |c7HERE:|c3 so
the entry does not take up any memory.
|e
The icon also has a |c7WINDOW=|c3 command in the tooltypes section of the
icon (check this with the workbench "info" command after clicking
once on the AssignIt icon). This sets up an initial window which
may be necessary for the programs being run if they output anything
to the |c7CLI|c3 window such as the |c7Projector|c3|-. Without the
window definition, a Software Error will result.|r1
You may decide to re-name a copy of |c7AssignIt|c3 to something
more suitable for your .film file.|r1
|c7AssignIt|c3 will also run from the |c7CLI|c3 simply by typing it's name,
making it easy to run the program simply by typing the "renamed"
name of the |c7AssignIt|c3 command.
|e
The |c7Enhanced Blit Utility|c3 is an example of the use of
|c7AssignIt|c3|-. The
file |c7EBU|c3 and it's icon is a renamed
|c7AssignIt|c3|-. By using the WorkBench
|c7"info"|c3 menu selection on the |c7EBU|c3 icon, you can inspect how
it was used in another example.
|e
Note that |c7AssignIt|c3|-'s use of |c7HERE:|c3 is not
multi-taskable, that is, if
you try to run two |c7AssignIt|c3 programs
simultaneously, the |c7HERE:|c3 label
may get changed, as such labels are system-wide. If this proves to
be a difficulty, an |c7ASSIGN uniquename: HERE:|c3 as the first command,
then using the unique name instead of |c7HERE:|c3 will minimize the problem.